#*******************************************************
import timeit
# To give the timeit module access to functions you define, you
# can pass a setup parameter which contains an import statement:
def rangeFun():

    sum = 0
    for i in range(100):
       sum = sum + i

    return sum

def xrangeFun():

    sum = 0
    for i in xrange(100):
       sum = sum + i
       
    return sum

if __name__ == '__main__':
    
    print(timeit.timeit("rangeFun()",  setup="from __main__ import rangeFun"))
    print(timeit.timeit("xrangeFun()", setup="from __main__ import xrangeFun"))
